import request from '@/axios/axios.js'

// 获取角色树
export const getRoleTree = () => {
    return request({
        url: '/basic/roleSuperior/getRoleTree',
        method: 'get'
    })
}

// 添加角色上下级关系
export const addRoleSuper = (data) => {
    return request({
        url: '/basic/roleSuperior/insertRoleSuper',
        method: 'post',
        data: data
    })
}

// 编辑角色上下级关系
export const updateRoleSuper = (data) => {
    return request({
        url: '/basic/roleSuperior/updateRoleSuper',
        method: 'post',
        data: data
    })
}

// 删除角色上下级关系
export const deleteRoleSuper = (params) => {
    return request({
        url: '/basic/roleSuperior/deleteRoleSuper',
        method: 'get',
        params: params
    })
}